package javapuzzles;

import java.util.Arrays;
import java.util.Comparator;

public class BananaBread {
	public static void main(String[] args) {
		Integer[] array = {3, 1, 4, 1, 5, 9 };
		System.out.println(Integer.MAX_VALUE);

		Arrays.sort(array, new Comparator<Integer>() {

			@Override
			public int compare(Integer o1, Integer o2) {
				System.out.println(o1);
				System.out.println(o2);
				if(o2 > o1) { 
					System.out.println("return 1");
					return -1;
				}/*else if(o1 < o2) {
					System.out.println("return -1");
					return 1;
				} */else {
					System.out.println("return 0");
					return 1;
				}
//				return o1 < o2 ? -1 : (o2 > o1 ? 1:0);
			}
			
		});
		System.out.println(Arrays.toString(array));
	}
}
